/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package acscoreserver.data;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Ricardo
 */
@Entity
@Table(name = "gameresult")
@NamedQueries({@NamedQuery(name = "Gameresult.findAll", query = "SELECT g FROM Gameresult g"), @NamedQuery(name = "Gameresult.findById", query = "SELECT g FROM Gameresult g WHERE g.id = :id"), @NamedQuery(name = "Gameresult.findByIdGame", query = "SELECT g FROM Gameresult g WHERE g.idGame = :idGame"), @NamedQuery(name = "Gameresult.findByCn", query = "SELECT g FROM Gameresult g WHERE g.cn = :cn"), @NamedQuery(name = "Gameresult.findByName", query = "SELECT g FROM Gameresult g WHERE g.name = :name"), @NamedQuery(name = "Gameresult.findByFrag", query = "SELECT g FROM Gameresult g WHERE g.frag = :frag"), @NamedQuery(name = "Gameresult.findByDeath", query = "SELECT g FROM Gameresult g WHERE g.death = :death"), @NamedQuery(name = "Gameresult.findByRole", query = "SELECT g FROM Gameresult g WHERE g.role = :role"), @NamedQuery(name = "Gameresult.findByHost", query = "SELECT g FROM Gameresult g WHERE g.host = :host")})
public class Gameresult implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "id_game")
    private int idGame;
    @Basic(optional = false)
    @Column(name = "cn")
    private int cn;
    @Basic(optional = false)
    @Column(name = "name")
    private String name;
    @Basic(optional = false)
    @Column(name = "frag")
    private int frag;
    @Basic(optional = false)
    @Column(name = "death")
    private int death;
    @Basic(optional = false)
    @Column(name = "role")
    private String role;
    @Basic(optional = false)
    @Column(name = "host")
    private String host;

    public Gameresult() {
    }

    public Gameresult(Integer id) {
        this.id = id;
    }

    public Gameresult(Integer id, int idGame, int cn, String name, int frag, int death, String role, String host) {
        this.id = id;
        this.idGame = idGame;
        this.cn = cn;
        this.name = name;
        this.frag = frag;
        this.death = death;
        this.role = role;
        this.host = host;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getIdGame() {
        return idGame;
    }

    public void setIdGame(int idGame) {
        this.idGame = idGame;
    }

    public int getCn() {
        return cn;
    }

    public void setCn(int cn) {
        this.cn = cn;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getFrag() {
        return frag;
    }

    public void setFrag(int frag) {
        this.frag = frag;
    }

    public int getDeath() {
        return death;
    }

    public void setDeath(int death) {
        this.death = death;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Gameresult)) {
            return false;
        }
        Gameresult other = (Gameresult) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "acscoreserver.Gameresult[id=" + id + "]";
    }

}
